# Import the main Flask application instance, typically named 'app',
# from the 'app' module within the 'myapp' package.
from myapp.app import app


# This block of code starts the Flask development web server.
# It's typically used for local development and testing.
# For production environments, a more robust WSGI server like Gunicorn or uWSGI should be used.
app.run(
    # The host '0.0.0.0' makes the server accessible from any IP address on the network,
    # not just from 'localhost'. This is useful for testing from other devices
    # on the same network or when running inside a container.
    host='0.0.0.0',
    # The port number on which the server will listen for incoming requests.
    port=8080,
    # Setting debug=True enables Flask's debug mode. This provides helpful features
    # during development, such as an interactive debugger in the browser for errors
    # and automatic reloading of the server when code changes are detected.
    # IMPORTANT: Debug mode should never be enabled in a production environment
    # due to security risks.
    debug=True,
)
